import unittest
import requests
import time
import HTMLTestReportCN
class adminHouJie(unittest.TestCase):

    def setUp(self):
        self.Authorization = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJseHoiLCJleHAiOjE1NDI5NDAxODMsInVpZCI6LTExNjc4MCwicm9sZSI6LTExNjYyNiwibmljayI6ImNlc2hpem0iLCJ0eXBlIjoxLCJpcCI6IjE4My4xNS4xNzcuOTciLCJtYWMiOiJjYzAzMmJlMTQ0NzdlYTIwNmI0ZjFmNTBhYjljYTViMzFmNDQ5YmExIn0=.c49a9206d1c83edc7d702d1e13fafe60b4160153c515d711624af219cb18ef00"
        self.main_url = "https://admin-api2.aic02.com"
    def test_login(self):
        # a = 'https://admin-api2.aic02.com/stat/today'
        # login_channel_url = self.main_url+"/stat/channel/7"
        # login_channel_headers = {'Authorization':'Bearer '+ self.Authorization}
        # login_channel_url_respones = requests.get(url=login_channel_url,headers = login_channel_headers)
        # # print(login_channel_url_respones.json().get('message'))
        # print(login_channel_url_respones.json())
        # print(login_channel_url_respones.status_code)
        # self.assertEqual(login_channel_url_respones.status_code, 200)
        # self.assertEqual(login_channel_url_respones.json().get('message'),'操作成功')

    #     login_member_url = self.main_url+"/stat/member/7"
    #     login_member_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     login_member_url_respones = requests.get(url=login_member_url, headers= login_member_headers)
    #     # print(login_membe_url_respones.json())
    #     # print(login_membe_url_respones.status_code)
    #     self.assertEqual(login_member_url_respones.status_code, 200)
    #     self.assertEqual(login_member_url_respones.json().get('message'), '操作成功')
    #
        login_today_url = self.main_url+"/stat/today"
        login_today_headers = {'Authorization': 'Bearer ' + self.Authorization}
        login_today_url_respones = requests.get(url=login_today_url, headers= login_today_headers)
        print(login_today_url_respones.json())
        print(login_today_url_respones.status_code)
        self.assertEqual(login_today_url_respones.status_code, 200)
        self.assertEqual(login_today_url_respones.json().get('message'), '操作成功')
    #
    #     login_amount_url = self.main_url+"/stat/amount/7"
    #     login_amount_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     login_amount_url_respones = requests.get(url=login_amount_url, headers= login_amount_headers)
    #     # print(login_amount_url_respones.json())
    #     # print(login_amount_url_respones.status_code)
    #     self.assertEqual(login_amount_url_respones.status_code, 200)
    #     self.assertEqual(login_amount_url_respones.json().get('message'), '操作成功')
    #
    #     login_profit_url = self.main_url+"/stat/top10/profit"
    #     login_profit_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     login_profit_url_respones = requests.get(url=login_profit_url, headers= login_profit_headers)
    #     # print(login_profit_url_respones.json())
    #     # print(login_profit_url_respones.status_code)
    #     self.assertEqual(login_profit_url_respones.status_code, 200)
    #     self.assertEqual(login_profit_url_respones.json().get('message'), '操作成功')
    #
    #     login_games_url = self.main_url+"/stat/games/7"
    #     login_games_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     login_games_url_respones = requests.get(url=login_games_url, headers= login_games_headers)
    #     # print(login_games_url_respones.json())
    #     # print(login_games_url_respones.status_code)
    #     self.assertEqual(login_games_url_respones.status_code, 200)
    #     self.assertEqual(login_games_url_respones.json().get('message'), '操作成功')
    #
    #     login_withdraw_url = self.main_url+"/stat/top10/withdraw"
    #     login_withdraw_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     login_withdraw_url_respones = requests.get(url=login_withdraw_url, headers=login_withdraw_headers)
    #     # print(login_withdraw_url_respones.json())
    #     # print(login_withdraw_url_respones.status_code)
    #     self.assertEqual(login_withdraw_url_respones.status_code, 200)
    #     self.assertEqual(login_withdraw_url_respones.json().get('message'), '操作成功')
    #
    #     login_deposit_url = self.main_url+"/stat/top10/deposit"
    #     login_deposit_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     login_deposit_url_respones = requests.get(url=login_deposit_url, headers=login_deposit_headers)
    #     # print(login_deposit_url_respones.json())
    #     # print(login_deposit_url_respones.status_code)
    #     self.assertEqual(login_deposit_url_respones.status_code, 200)
    #     self.assertEqual(login_deposit_url_respones.json().get('message'), '操作成功')
    #
    def test_user(self):#123
        # 用户--会员管理--进入页面
        user_url = "https://admin-api2.aic02.com/user/level"

        user_headers = {'Authorization': 'Bearer ' + self.Authorization}
        user_respones = requests.get(url=user_url,headers=user_headers)
        print(user_respones.status_code)
        print(user_respones.json())
       # self.assertEqual(user_respones.status_code, 200)
        #self.assertEqual(user_respones.json().get('message'), '操作成功')
    #     # 用户--会员管理--新增用户"user_name":"testjiekou01","password":"111111"
    #     # user_register_url = self.main_url+"/user/register"
    #     # user_register_headers = {'Authorization': 'Bearer ' + self.Authorization,'Content-Type': 'application/json'}
    #     # user_register_data = {"user_name":"testjiekou02","password":"111111","is_test":"1","bkge_sport":"0","bkge_lottery":50,"bkge_live":"0","bkge_game":"0"}
    #     # user_register_respones = requests.put(url=user_register_url,json=user_register_data,headers=user_register_headers)
    #     # print(user_register_respones.status_code)
    #     # print(user_register_respones.json())
    #     # self.assertEqual(user_register_respones.status_code, 200)
    #     # self.assertEqual(user_register_respones.json().get('message'), '操作成功')
    #
    #     user_list_url = self.main_url+"/user/list"
    #     user_list_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     user_list_params = {'page':1,'page_size':20}
    #     user_list_respones = requests.get(url=user_list_url,params=user_list_params, headers=user_list_headers)
    #     print(user_list_respones.status_code)
    #     print(user_list_respones.json())
    #     self.assertEqual(user_list_respones.status_code, 200)
    #     self.assertEqual(user_list_respones.json().get('message'), '操作成功')
    #
    #
    #     # 用户--会员等级
    #     membersleve_url = self.main_url+"/memberslevel"
    #     membersleve_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     membersleve_params = {'page':1,'page_size':20}
    #     membersleve_respones = requests.get(url=membersleve_url,params=membersleve_params,headers=membersleve_headers)
    #     print(membersleve_respones.status_code)
    #     print(membersleve_respones.json())
    #     self.assertEqual(membersleve_respones.status_code, 200)
    #     self.assertEqual(membersleve_respones.json().get('message'), '操作成功')
    #
    #
    #     # 用户--会员标签
    #     labels_url = self.main_url+"/user/labels"
    #     labels_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #labels_params = {'page':1,'page_size':20}
    #     labels_respones = requests.get(url=labels_url,headers=labels_headers)
    #     print(labels_respones.status_code)
    #     print(labels_respones.json())
    #     self.assertEqual(labels_respones.status_code, 200)
    #     self.assertEqual(labels_respones.json().get('message'), '操作成功')
    #
    #     # 用户--管理员列表
    #     account_url = self.main_url+"/admin/account"
    #     account_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     account_params = {'page':1,'page_size':20}
    #     account_respones = requests.get(url=account_url,params=account_params, headers=account_headers)
    #     print(labels_respones.status_code)
    #     print(account_respones.json())
    #     self.assertEqual(account_respones.status_code, 200)
    #     self.assertEqual(account_respones.json().get('message'), '操作成功')
    #
    #     # 用户--管理员角色
    #     role_url = self.main_url+"/admin/role"
    #     role_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     role_params = {'page':1,'page_size':20}
    #     role_respones = requests.get(url=role_url,params=role_params, headers=role_headers)
    #     print(labels_respones.status_code)
    #     print(role_respones.json())
    #     self.assertEqual(role_respones.status_code, 200)
    #     self.assertEqual(role_respones.json().get('message'), '操作成功')
    #
    #
    # def test_live(self):
    #     # 直播--玩家管理
    #     queryPlayerInfo_url = "http://live-zull.vduat.com/hall/1.0/condtition/queryPlayerInfo"
    #     queryPlayerInfo_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     queryPlayerInfo_params = {'pageNum': 1, 'pageSize': 10}
    #     queryPlayerInfo_respones = requests.get(url=queryPlayerInfo_url, params=queryPlayerInfo_params, headers=queryPlayerInfo_headers)
    #     print(queryPlayerInfo_respones.status_code)
    #     print(queryPlayerInfo_respones.text)
    #     self.assertEqual(queryPlayerInfo_respones.status_code, 200)
    #     self.assertEqual(queryPlayerInfo_respones.json().get('message'), '成功')
    #
    #     # 直播--直播管理
    #     anchor_query_url = "http://live-zull.vduat.com/hall/1.0/anchor/query"
    #     anchor_query_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     anchor_query_params = {'pageNum': 1, 'pageSize': 10}
    #     anchor_query_respones = requests.get(url=anchor_query_url, params=anchor_query_params, headers=anchor_query_headers)
    #     print(anchor_query_respones.status_code)
    #     print(anchor_query_respones.text)
    #     self.assertEqual(anchor_query_respones.status_code, 200)
    #     self.assertEqual(anchor_query_respones.json().get('message'), '成功')
    #
    #     # 直播--房间管理
    #     live_query_url = "http://live-zull.vduat.com/hall/1.0/room/live/query"
    #     live_query_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     live_query_params = {'pageNum': 1, 'pageSize': 10}
    #     live_query_respones = requests.get(url=live_query_url, params=live_query_params, headers=live_query_headers)
    #     print(live_query_respones.status_code)
    #     print(live_query_respones.text)
    #     self.assertEqual(live_query_respones.status_code, 200)
    #     self.assertEqual(live_query_respones.json().get('message'), '成功')
    #
    #     # 直播--风控管理
    #     prohibited_query_url = "http://live-zull.vduat.com/hall/1.0/risk/prohibited/query"
    #     prohibited_query_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     prohibited_query_params = {'pageNum': 1, 'pageSize': 10}
    #     prohibited_query_respones = requests.get(url=prohibited_query_url, params=prohibited_query_params, headers=prohibited_query_headers)
    #     print(prohibited_query_respones.status_code)
    #     print(prohibited_query_respones.text)
    #     self.assertEqual(prohibited_query_respones.status_code, 200)
    #     self.assertEqual(prohibited_query_respones.json().get('message'), '成功')
    #
    #     gameType_query_url = "http://live-zull.vduat.com/hall/1.0/risk/gameType/query"
    #     gameType_query_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #gameType_query_params = {'pageNum': 1, 'pageSize': 10}
    #     gameType_query_respones = requests.get(url=gameType_query_url, headers=gameType_query_headers)
    #     print(gameType_query_respones.status_code)
    #     print(gameType_query_respones.text)
    #     self.assertEqual(gameType_query_respones.status_code, 200)
    #     self.assertEqual(gameType_query_respones.json().get('message'), '成功')
    #
    #     # 直播--主播报表
    #     log_query_url = "http://live-zull.vduat.com/hall/1.0/income/log/query"
    #     log_query_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     log_query_params = {'pageNum': 1, 'pageSize': 10}
    #     log_query_respones = requests.get(url=log_query_url, params=log_query_params,
    #                                              headers=log_query_headers)
    #     print(log_query_respones.status_code)
    #     print(log_query_respones.text)
    #     self.assertEqual(log_query_respones.status_code, 200)
    #     self.assertEqual(log_query_respones.json().get('message'), '成功')
    #
    #     # 直播--影片管理
    #     video_url = "http://live-zull.vduat.com/hall/1.0/video/list"
    #     video_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     video_params = {'pageNum': 1, 'pageSize': 10}
    #     video_respones = requests.get(url=video_url, params=video_params,
    #                                       headers=video_headers)
    #     print(video_respones.status_code)
    #     print(video_respones.text)
    #     self.assertEqual(video_respones.status_code, 200)
    #     self.assertEqual(video_respones.json().get('message'), '成功')
    #
    # def test_video(self):
    #     # 影片--高清影片
    #     fg_video_url = self.main_url+"/video/fg/video"
    #     fg_video_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     fg_video_params = {'page': 1, 'page_siz': 10}
    #     fg_video_respones = requests.get(url=fg_video_url, params=fg_video_params, headers=fg_video_headers)
    #     print(fg_video_respones.status_code)
    #     print(fg_video_respones.text)
    #     self.assertEqual(fg_video_respones.status_code, 200)
    #     self.assertEqual(fg_video_respones.json().get('message'), '操作成功')
    #
    #     # 影片--推广中心
    #     fg_url = self.main_url+"/video/fg/level"
    #     fg_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     fg_params = {'page': 1, 'page_siz': 10}
    #     fg_respones = requests.get(url=fg_url, params=fg_params, headers=fg_headers)
    #     print(fg_respones.status_code)
    #     print(fg_respones.text)
    #     self.assertEqual(fg_respones.status_code, 200)
    #     self.assertEqual(fg_respones.json().get('message'), '操作成功')
    #
    # def test_servicemanage(self):
    #     # 客服--客服工作台
    #     config_url = self.main_url+"/servicemanage/config"
    #     config_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     config_params = {'page': 1, 'page_siz': 10}
    #     config_respones = requests.get(url=config_url, params=config_params, headers=config_headers)
    #     print(config_respones.status_code)
    #     print(config_respones.text)
    #     self.assertEqual(config_respones.status_code, 200)
    #     self.assertEqual(config_respones.json().get('message'), '操作成功')
    #
    #     service_find_url = self.main_url+"/servicemanage/other/service/find"
    #     service_find_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     service_find_params = {'account': 'ceshi19'}
    #     service_find_respones = requests.get(url=service_find_url, params=service_find_params, headers=service_find_headers)
    #     print(service_find_respones.status_code)
    #     print(service_find_respones.text)
    #     self.assertEqual(service_find_respones.status_code, 200)
    #     self.assertEqual(service_find_respones.json().get('message'), '操作成功')
    #
    #     language_folder_url = self.main_url+"/servicemanage/language/folder"
    #     language_folder_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #language_folder_params = {'account': 'ceshi19'}
    #     language_folder_respones = requests.get(url=language_folder_url,  headers=language_folder_headers)
    #     print(language_folder_respones.status_code)
    #     print(language_folder_respones.text)
    #     self.assertEqual(language_folder_respones.status_code, 200)
    #     self.assertEqual(language_folder_respones.json().get('message'), '操作成功')
    #
    #     # 客服--客服统计
    #     statistics_today_url = self.main_url+"/servicemanage/statistics/today"
    #     statistics_today_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #statistics_today_params = {'page': 1, 'page_siz': 10}
    #     statistics_today_respones = requests.get(url=statistics_today_url, headers=statistics_today_headers)
    #     print(statistics_today_respones.status_code)
    #     print(statistics_today_respones.text)
    #     self.assertEqual(statistics_today_respones.status_code, 200)
    #     self.assertEqual(statistics_today_respones.json().get('message'), '操作成功')
    #
    #     statistics_comment_url = self.main_url+"/servicemanage/statistics/comment"
    #     statistics_comment_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #statistics_comment_params = {'page': 1, 'page_siz': 10}
    #     statistics_comment_respones = requests.get(url=statistics_comment_url, headers=statistics_comment_headers)
    #     print(statistics_comment_respones.status_code)
    #     print(statistics_comment_respones.text)
    #     self.assertEqual(statistics_comment_respones.status_code, 200)
    #     self.assertEqual(statistics_comment_respones.json().get('message'), '操作成功')
    #
    #     statistics_question_url = self.main_url+"/servicemanage/statistics/question"
    #     statistics_question_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #statistics_question_params = {'page': 1, 'page_siz': 10}
    #     statistics_question_respones = requests.get(url=statistics_question_url, headers=statistics_question_headers)
    #     print(statistics_question_respones.status_code)
    #     print(statistics_question_respones.text)
    #     self.assertEqual(statistics_question_respones.status_code, 200)
    #     self.assertEqual(statistics_question_respones.json().get('message'), '操作成功')
    #
    #     statistics_receive_url = self.main_url+"/servicemanage/statistics/receive"
    #     statistics_receive_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #statistics_receive_params = {'page': 1, 'page_siz': 10}
    #     statistics_receive_respones = requests.get(url=statistics_receive_url, headers=statistics_receive_headers)
    #     print(statistics_receive_respones.status_code)
    #     print(statistics_receive_respones.text)
    #     self.assertEqual(statistics_receive_respones.status_code, 200)
    #     self.assertEqual(statistics_receive_respones.json().get('message'), '操作成功')
    #
    #     queryMovieList_url = "http://play-api.tctest0.com/manager/1.0/queryMovieList"
    #     queryMovieList_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     queryMovieList_params = {'pageNum': 1, 'pageSize': 10}
    #     queryMovieList_respones = requests.get(url=queryMovieList_url, params=queryMovieList_params, headers=queryMovieList_headers)
    #     print(queryMovieList_respones.status_code)
    #     print(queryMovieList_respones.json())
    #     self.assertEqual(queryMovieList_respones.status_code, 200)
    #     #self.assertEqual(queryMovieList_respones.json().get('message'), '操作成功')
    #
    #     queryMovieList_url = "http://play-api.tctest0.com/manager/1.0/queryMovieList"
    #     queryMovieList_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     queryMovieList_params = {'pageNum': 1, 'pageSize': 10}
    #     queryMovieList_respones = requests.get(url=queryMovieList_url, params=queryMovieList_params, headers=queryMovieList_headers)
    #     print(queryMovieList_respones.status_code)
    #     print(queryMovieList_respones.json())
    #     self.assertEqual(queryMovieList_respones.status_code, 200)
    #     #self.assertEqual(queryMovieList_respones.json().get('message'), '操作成功')
    #
    #     # 客服--会话记录
    #     session_list_url = self.main_url+"/servicemanage/session/list"
    #     session_list_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     session_list_params = {'page': 1, 'page_siz': 10}
    #     session_list_respones = requests.get(url=session_list_url, params=session_list_params, headers=session_list_headers)
    #     print(session_list_respones.status_code)
    #     print(session_list_respones.text)
    #     self.assertEqual(session_list_respones.status_code, 200)
    #     self.assertEqual(session_list_respones.json().get('message'), '操作成功')
    #
    #     other_questions_url = self.main_url+"/servicemanage/other/questions"
    #     other_questions_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #other_questions_params = {'page': 1, 'page_siz': 10}
    #     other_questions_respones = requests.get(url=other_questions_url, headers=other_questions_headers)
    #     print(other_questions_respones.status_code)
    #     print(other_questions_respones.text)
    #     self.assertEqual(other_questions_respones.status_code, 200)
    #     self.assertEqual(other_questions_respones.json().get('message'), '操作成功')
    #
    #     # 客服--客服绩效
    #     servicemanage_performance_url = self.main_url+"/servicemanage/performance"
    #     servicemanage_performance_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     servicemanage_performance_params = {'page': 1, 'page_siz': 10}
    #     servicemanage_performance_respones = requests.get(url=servicemanage_performance_url, params=servicemanage_performance_params,
    #                                          headers=servicemanage_performance_headers)
    #     print(servicemanage_performance_respones.status_code)
    #     print(servicemanage_performance_respones.text)
    #     self.assertEqual(servicemanage_performance_respones.status_code, 200)
    #     self.assertEqual(servicemanage_performance_respones.json().get('message'), '操作成功')
    #
    #     # 客服--客服设置
    #     other_service_url = self.main_url+"/servicemanage/other/service"
    #     other_service_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     other_service_params = {'page': 1, 'page_siz': 10}
    #     other_service_respones = requests.get(url=other_service_url, params=other_service_params,headers=other_service_headers)
    #     print(other_service_respones.status_code)
    #     print(other_service_respones.text)
    #     self.assertEqual(other_service_respones.status_code, 200)
    #     self.assertEqual(other_service_respones.json().get('message'), '操作成功')
    #
    #     servicemanage_questions_url = self.main_url+"/servicemanage/other/questions"
    #     servicemanage_questions_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     servicemanage_questions_params = {'page': 1, 'page_siz': 10}
    #     servicemanage_questions_respones = requests.get(url=servicemanage_questions_url,params=service_find_params, headers=servicemanage_questions_headers)
    #     print(servicemanage_questions_respones.status_code)
    #     print(servicemanage_questions_respones.text)
    #     self.assertEqual(servicemanage_questions_respones.status_code, 200)
    #     self.assertEqual(servicemanage_questions_respones.json().get('message'), '操作成功')
    #
    #     servicemanage_welcome_url = self.main_url+"/servicemanage/other/welcome"
    #     servicemanage_welcome_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #servicemanage_welcome_params = {'page': 1, 'page_siz': 10}
    #     servicemanage_welcome_respones = requests.get(url=servicemanage_welcome_url, headers=servicemanage_welcome_headers)
    #     print(servicemanage_welcome_respones.status_code)
    #     print(servicemanage_welcome_respones.text)
    #     self.assertEqual(servicemanage_welcome_respones.status_code, 200)
    #     self.assertEqual(servicemanage_welcome_respones.json().get('message'), '操作成功')
    #
    # def test_report(self):
    #     # 报表--总报表
    #     config_url = self.main_url+"http://admin-api/user/agent/report"
    #     config_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     #config_params = {'page': 1, 'page_siz': 10}
    #     config_respones = requests.get(url=config_url,headers=config_headers)
    #     print(config_respones.status_code)
    #     print(config_respones.text)
    #     self.assertEqual(config_respones.status_code, 200)
    #     self.assertEqual(config_respones.json().get('message'), '操作成功')
    #
    #     config_url = self.main_url + "/report/updated?type=main_day"
    #     config_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     config_params = {'page': 'main_day'}
    #     config_respones = requests.get(url=config_url, params=config_params, headers=config_headers)
    #     print(config_respones.status_code)
    #     print(config_respones.text)
    #     self.assertEqual(config_respones.status_code, 200)
    #     self.assertEqual(config_respones.json().get('message'), '操作成功')
    #
    #     #报表--代理报表
    #     config_url = self.main_url + "http://admin-api2.tctest0.com/report/agent?page=1&page_size=20&start_time=2018-11-08&end_time=2018-11-08&order_by=sum_profit&order_rule=desc"
    #     config_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     config_params = {'page': 'main_day'}
    #     config_respones = requests.get(url=config_url, params=config_params, headers=config_headers)
    #     print(config_respones.status_code)
    #     print(config_respones.text)
    #     self.assertEqual(config_respones.status_code, 200)
    #     self.assertEqual(config_respones.json().get('message'), '操作成功')
    #
    #     # 报表--代理报表
    #     config_url = self.main_url + "http://admin-api2.tctest0.com/report/updated?type=user"
    #     config_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     config_params = {'page': 'main_day'}
    #     config_respones = requests.get(url=config_url, params=config_params, headers=config_headers)
    #     print(config_respones.status_code)
    #     print(config_respones.text)
    #     self.assertEqual(config_respones.status_code, 200)
    #     self.assertEqual(config_respones.json().get('message'), '操作成功')
    #
    #     # 报表--代理报表
    #     config_url = self.main_url + "http://admin-api2.tctest0.com/report/agent?page=1&page_size=20&start_time=2018-11-08&end_time=2018-11-08&order_by=sum_profit&order_rule=desc"
    #     config_headers = {'Authorization': 'Bearer ' + self.Authorization}
    #     config_params = {'page': 'main_day'}
    #     config_respones = requests.get(url=config_url, params=config_params, headers=config_headers)
    #     print(config_respones.status_code)
    #     print(config_respones.text)
    #     self.assertEqual(config_respones.status_code, 200)
    #     self.assertEqual(config_respones.json().get('message'), '操作成功')







    def tearDown(self):
        #print('接口测试通过')
        pass

if __name__ == "__main__":
    unittest.main()